package com.tony.spring.mode.chain;

public class ChainTest {

	public static void main(String[] args) throws Exception {
		// 1、医院对象
		DoctorDoor doctorDoor = new DoctorDoor();
		
		//2、科室医生
		DoctorChain chain = new WhyDoctor();
		DoctorChain chain2 = new ZhaoDoctor();
		DoctorChain chain3 = new HaDoctor();
		
		doctorDoor.registerDoctor(chain);
		doctorDoor.registerDoctor(chain2);
		doctorDoor.registerDoctor(chain3);
		
		// 3、需要病人
		BingUser bingUser = new BingUser("W");
		
		doctorDoor.receiveBingUser(bingUser);
		
	}
}
